[196-Disable] Update agent diagram to show disabled state

Glenn 'devalias' Grant 11 years ago
parent
commit
ea1138613e
1 changed files with 6 additions and 6 deletions
  1. 6 6
      app/views/agents/diagram.html.erb

+ 6 - 6
app/views/agents/diagram.html.erb

@@ -10,12 +10,12 @@
10 10
 
11 11
       <div class='digraph'>
12 12
         <%
13
-           dot_format_string = "digraph foo {"
14
-           @agents.each.with_index do |agent, index|
15
-             dot_format_string += "\"#{agent.name}\";"
16
-             agent.receivers.each do |receiver|
17
-               dot_format_string += "\"#{agent.name}\"->\"#{receiver.name}\";"
18
-             end
13
+          dot_format_string = "digraph foo {"
14
+          @agents.each.with_index do |agent, index|
15
+            dot_format_string += "\"#{agent.name}#{" (Disabled)" if agent.disabled?}\";"
16
+            agent.receivers.each do |receiver|
17
+              dot_format_string += "\"#{agent.name}#{" (Disabled)" if agent.disabled?}\"->\"#{receiver.name}#{" (Disabled)" if receiver.disabled?}\";"
18
+            end
19 19
            end
20 20
            dot_format_string = dot_format_string + "}"
21 21
         %>